﻿using System.Collections;
using System.Collections.Generic;

namespace Xfs
{
    public class XfsAstarComponent : XfsComponent
    {
        public List<Vector3>? Vector3Path { get; set; }
        public Vector3 Target { get; set; }
        public XfsGrid? goal { get; set; }
        public ArrayList? paths { get; set; }
        public XfsGrid? LastGoal { get; set; }
        public XfsUnit? Unit
        {
            get { return this.GetParent<XfsUnit>(); }
        }
        public XfsGrid? start 
        { 
            get { return XfsGridMapComponent.Insatnce.ToGrid(this.Unit.Position); } 
        }
        public XfsGridMap? GridMap
        {
            get { return XfsGridMapComponent.Insatnce.GetGridMap(); }
        }
        public XfsGrid[,]? grids 
        { 
            get { return this.GridMap.Grids; }
        }
        public bool isPath { get; set; } = false;
        public XfsPriorityQueue? openList { get; set; }
        public XfsPriorityQueue? closedList { get; set; }
    }
}
